export default (url: string = "", jumpType: string = "navigateTo") => {
	return new Promise((resolve, reject) => {
		if (!url) {
			reject("路径为空不做任何跳转")
			return void console.error("路径为空不做任何跳转")
		}
		if (["navigateTo", "redirectTo", "reLaunch", "switchTab"].indexOf(jumpType) == -1) {
			reject("页面跳转类型不存在")
			return void console.error("页面跳转类型不存在")
		}
		uni[jumpType]?.({
			url,
			success() {
				resolve("success")
			},
			fail() {
				reject("跳转失败了")
			}
		})
	})
}